'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
// 接口
module.exports = app => {
  // 中间件 用()调用
  const counter =app.middleware.counter()
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/ejs', controller.home.ejs);
  router.get('/jsb', controller.jsb.index);
  router.get('/jsp', controller.jsp.index);
  router.get('/getGirls', controller.jsb.getGirls);
  router.get('/getGirls2/:name/:age', controller.jsb.getGirls2);
  router.get('/zy/:name/:age', controller.jsp.zy);
  router.get('/ejs1',counter, controller.jsp.ejs);// 中间件做为第二个参数
  router.post('/add', controller.jsp.add);
  router.post('/del', controller.jsp.del);
  router.post('/editor', controller.jsp.editor);
  router.post('/show', controller.jsp.show);
  router.get('/newconxtext',controller.jsp.newconxtext);
  router.post('/newconxtext',controller.jsp.newconxtext);
  router.post('/newRequest',controller.jsp.newRequest);
  router.get('/newResponse',controller.jsp.newResponse);
  router.get('/newHelper',controller.jsp.newHelper);
};
